import request from '@/utils/request'

// 查询司机信息列表
export function listDriverInfo (query) {
  return request({
    url: '/driver/info/list',
    method: 'get',
    params: query
  })
}

// 查询司机信息详细
export function getDriverInfo (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/driver/info/getInfo',
    method: 'get',
    params: params
  })
}

// 新增司机信息
export function addDriverInfo (data) {
  return request({
    url: '/driver/info/insert',
    method: 'post',
    data: data
  })
}

// 修改司机信息
export function updateDriverInfo (data) {
  return request({
    url: '/driver/info/update',
    method: 'post',
    data: data
  })
}

// 删除司机信息
export function delDriverInfo (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/driver/info/delete',
    method: 'post',
    params: params
  })
}
// 批量删除司机信息
export function delBatchDriverInfo (ids) {
  const params = {
    'ids': ids
  }
  return request({
    url: '/driver/info/deleteBatch',
    method: 'post',
    params: params
  })
}

// 导入司机信息
export function importData (data) {
  return request({
    url: '/driver/info/importData',
    method: 'post',
    data: data
  })
}
